package com.wwj.springboot.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.wwj.springboot.dao.OrderMapper;
import com.wwj.springboot.entity.Order;
import com.wwj.springboot.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * @author wwj
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService{

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public void addOrder(int pid, int userid) {
        Order order = new Order();
        order.setUserid(userid);
        order.setPid(pid);
        order.setState(0);
        orderMapper.addOrder(order);
    }
}
